package com.bjwl.modules.back.controller;

import com.bjwl.common.utils.R;
import com.bjwl.modules.back.entity.ExamInfoEntity;
import com.bjwl.modules.back.services.ExamInfoService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;
import java.util.Map;



/**
 * 考试
 *
 * @author guoyp
 * @email guoyp2126@163.com
 * @date 2021-11-20 17:22:25
 */
@RestController
@RequestMapping("trc/examinfo")
public class ExamInfoController {
    @Autowired
    private ExamInfoService examInfoService;

    /**
     * 列表
     */
    @RequestMapping("/list")
    @RequiresPermissions("trc:examinfo:list")
    public R list(@RequestParam Map<String, Object> params){
       // PageUtils page = examInfoService.queryPage(params);

        return R.ok();
    }



    /**
     * 保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody ExamInfoEntity examInfo){
			examInfoService.save(examInfo);

        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody ExamInfoEntity examInfo){
			examInfoService.updateById(examInfo);

        return R.ok();
    }

    /**
     * 删除
     */
    @RequestMapping("/delete")
    @RequiresPermissions("trc:examinfo:delete")
    public R delete(@RequestBody Integer[] ids){
			examInfoService.removeByIds(Arrays.asList(ids));

        return R.ok();
    }

}
